package com.itboye.eweilisten.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;

import com.itboye.eweilisten.R;
import com.itboye.eweilisten.model.TextABean;

/**
 * Created by itboye on 2017/4/5.
 */

public class TextAAdapter  extends BaseAdapter{
    TextABean bean;
    Context context;
    public  TextAAdapter( TextABean bean, Context context){
        this.bean=bean;
        this.context=context;

    }
    @Override
    public int getCount() {
        return 3;
    }

    @Override
    public Object getItem(int position) {
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHouder houder=null;
        if(convertView==null){
            houder=new ViewHouder();
            convertView= LayoutInflater.from(context).inflate(R.layout.item_texta,null);
            houder.linearLayout= (LinearLayout) convertView.findViewById(R.id.gridLin);
            convertView.setTag(houder);
        }else{
            houder= (ViewHouder) convertView.getTag();
        }

        return convertView;
    }
    public class ViewHouder{
        LinearLayout linearLayout;
    }
}
